package com.czf.personal.controller;

import com.czf.common.entity.BankUserInfo;
import com.czf.common.util.AjaxResult;
import com.czf.personal.service.BankUserInfoServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zfChen
 * @create 2022/4/22 13:40
 */
@RestController
@CrossOrigin
@Slf4j
@RequestMapping("/bank")
public class BankUserInfoController {

    @Autowired
    private BankUserInfoServiceImpl bankUserInfoService;

    @RequestMapping(value = "/select",method = RequestMethod.GET)
    public AjaxResult select(BankUserInfo bankUserInfo,Long userId){
        int select = bankUserInfoService.select(bankUserInfo,userId);
        if (select == 10) {
            return AjaxResult.error();
        }
        return AjaxResult.success(select);
    }
}
